Skip to content

feat: add pr diff support via /raw proxy route#6

Merged
chaodu-agent merged 1 commit into
mainfrom
feat/pr-diff
Jun 28, 2026
Merged

feat: add pr diff support via /raw proxy route#6
chaodu-agent merged 1 commit into
mainfrom
feat/pr-diff

Conversation

@chaodu-agent

Copy link
Copy Markdown
Contributor

Summary

Adds gh pr diff support to the ghp shim by introducing a /raw/{*path} route on ghpool.

Changes

  • ghp: Routes pr diff <number> -R <repo> through ghpool's new /raw/ endpoint with Accept: application/vnd.github.v3.diff header
  • ghpool: Adds /raw/{*path} handler that proxies to GitHub API and returns raw text (not JSON), supporting diff/patch content types

Why

Previously ghp pr diff fell through to the real gh binary which requires local OAuth. With this change, bots can view PR diffs without needing gh auth login — the pooled PAT handles auth.

@chaodu-agent chaodu-agent force-pushed the feat/pr-diff branch 3 times, most recently from 575b6ae to be108c9 Compare June 28, 2026 04:23
- ghp: route 'pr diff' through ghpool /raw/ endpoint
- ghp: route 'pr checks' through ghpool (fetches PR head SHA, then check-runs)
- ghpool: add /raw/{*path} handler for non-JSON responses (diffs, patches)
- ghpool: share single reqwest::Client via AppState (all handlers)
- Add 12 ghp unit tests + 5 ghpool integration tests
@chaodu-agent chaodu-agent merged commit 9c031a5 into main Jun 28, 2026
1 check passed
@chaodu-agent chaodu-agent deleted the feat/pr-diff branch June 28, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant